<?php require_once('Connections/dis01.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

mysql_select_db($database_dis01, $dis01);
$query_ls_versiculo = "SELECT verso_id, verso_descricao FROM versiculos ORDER BY verso_id DESC";
$ls_versiculo = mysql_query($query_ls_versiculo, $dis01) or die(mysql_error());
$row_ls_versiculo = mysql_fetch_assoc($ls_versiculo);
$totalRows_ls_versiculo = mysql_num_rows($ls_versiculo);

$colname_ls_msg = "-1";
if (isset($_GET['dev_id'])) {
  $colname_ls_msg = $_GET['dev_id'];
}
mysql_select_db($database_dis01, $dis01);
$query_ls_msg = sprintf("SELECT dev_id, dev_data, dev_titulo, dev_resumo, dev_descricao, dev_tp_msg, dev_situacao, dev_cadastrador FROM devocional WHERE dev_id = %s", GetSQLValueString($colname_ls_msg, "int"));
$ls_msg = mysql_query($query_ls_msg, $dis01) or die(mysql_error());
$row_ls_msg = mysql_fetch_assoc($ls_msg);
$totalRows_ls_msg = mysql_num_rows($ls_msg);
?>
<!DOCTYPE HTML5>
<html lang="pt-br">
<head>
<meta http-equiv="Content-Type" content="text/html; charset= UTF-8" />
<title>Disseminando.com</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="templatemo_style.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="css/orman.css" type="text/css" media="screen" />
<link rel="stylesheet" href="css/nivo-slider.css" type="text/css" media="screen" />	

<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />
>

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/ddsmoothmenu.js">

/***********************************************
* Smooth Navigational Menu- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

<script type="text/javascript">

ddsmoothmenu.init({
	mainmenuid: "templatemo_menu", //menu DIV id
	orientation: 'h', //Horizontal or vertical menu: Set to "h" or "v"
	classname: 'ddsmoothmenu', //class added to menu's outer DIV
	//customtheme: ["#1c5a80", "#18374a"],
	contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
})

</script>

<link rel="stylesheet" href="css/slimbox2.css" type="text/css" media="screen" /> 
<script type="text/JavaScript" src="js/slimbox2.js"></script> 

</head>
<body id="home">

<div id="templatemo_wrapper">

	<div id="templatemo_header">
    	<div id="site_title"><img src="images/logo_projeto.png" width="296" height="76" /></div>
        <div id="templatemo_menu" class="ddsmoothmenu">
            <ul>
                <li><a href="publicacao1001.php" class="selected">Voltar</a></li>
                </li>
            </ul>
            <br style="clear: left" />
        </div> <!-- end of templatemo_menu -->
    </div> <!-- END of header -->
    
    <div id="templatemo_slider"><span class="sliderframe"></span>
    	 <div class="slider-wrapper theme-orman">
            <div id="slider" class="nivoSlider">
            	<img src="images/slider/01.jpg" alt="slider image 2" title="#htmlcaption" />
                <img src="images/slider/02.jpg" alt="slider image 2" title="#htmlcaption"/>
                <img src="images/slider/03.jpg" alt="slider image 2" title="#htmlcaption" />
                <img src="images/slider/04.jpg" alt="slider image 4" title="#htmlcaption"/>
            </div>
            <div id="htmlcaption" class="nivo-html-caption">
                <strong>Contato: antoniomarcosborges2008@gmail.com</strong>.
            </div>
        </div> 
		<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
        <script type="text/javascript" src="js/jquery.nivo.slider.pack.js"></script>
        <script type="text/javascript">
        $(window).load(function() {
            $('#slider').nivoSlider({
				controlNav:false,
   			 directionNavHide: false
			});
        });
        </script>
    </div><!-- END of templatemo_slider -->
    
    <div id="templatemo_twitter">
    	<?php echo $row_ls_versiculo['verso_descricao']; ?> </div> <!-- END of twitter -->
    
    <div id="templatemo_main">
      <form id="form1" name="form1" method="post" action="">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="9%" height="22"><font size="2">Data :</font></td>
            <td width="91%"><font size="2"><?php echo $row_ls_msg['dev_data']; ?></font></td>
          </tr>
          <tr>
            <td height="25" valign="top"><font size="2">Titulo :</font></td>
            <td valign="top"><font size="2"><?php echo $row_ls_msg['dev_titulo']; ?></font></td>
          </tr>
          <tr>
            <td valign="top"><font size="2">Resumo :</font></td>
            <td><p align="justify"><font size="2"><?php echo $row_ls_msg['dev_resumo']; ?></font></p></td>
          </tr>
          <tr>
            <td valign="top"><font size="2">Descri&ccedil;&atilde;o :</font></td>
            <td><p align="justify"><font size="2"><?php echo $row_ls_msg['dev_descricao']; ?></font></p></td>
          </tr>
          <tr>
            <td><font size="2">Autor :</font></td>
            <td><font size="2"><?php echo $row_ls_msg['dev_cadastrador']; ?></font></td>
          </tr>
          <tr>
            <td><input name="hiddenField" type="hidden" id="hiddenField" value="<?php echo $row_ls_msg['dev_id']; ?>" /></td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </form>
</div> <!-- END of content -->
        <div class="clear"></div>


</div> <!-- END of wrapper -->

<div id="templatemo_bottom_wrapper">
	<div id="templatemo_bottom">
    	
        <div class="col col_3">
          <iframe frameborder="0" marginwidth="0" marginheight="0" scrolling="No" width="100%" height="30" style= "position: fixed; top: 0%; left: 0%;height: 6%;width: 100%;" src="http://streaming15.hstbr.net/player/radiogospeladoradores"></iframe>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
    </div> <!-- END of bottom -->
    
</div> <!-- END of bottom wrapper -->

<div id="templatemo_footer_wrapper">
	<div id="templatemo_footer"> Desenvolvido por: AntonioBorges&reg; | <br />
Integrando sua F&Eacute; ao futuro. </div> 
	<!-- END of footer -->
</div> <!-- END of footer wrapper -->

</body>
</html>
<?php
mysql_free_result($ls_versiculo);

mysql_free_result($ls_msg);
?>
